package com.tourism.controller;

import com.tourism.util.MailUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Description 邮箱服务
 * @Author z
 * @Date 2021-03-08 21:13
 */
@Controller
@RequestMapping("/mail")
public class MessageController {

    @Autowired
    private MailUtils mailUtils;
         //f=发送验证码
    @PostMapping("/sendCode")
    @ResponseBody
    public boolean sendCode(String mail) {
        return mailUtils.sendMimeMail(mail);
    }

}
